package com.hm.hw1224;

import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component;
@Component
public class String2GirlConver implements Converter<String, Girl>{

	@Override
	public Girl convert(String arg0) {
		String[] args = arg0.split("__");
		Girl girl = new Girl();
		girl.setName(args[0]);
		girl.setAge(Integer.valueOf(args[1]));
		girl.setHeight(Integer.valueOf(args[2]));
		girl.setBao(args[3]);
		return girl;
	}

}
